package com.itcast.config;

import org.springframework.amqp.core.*;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;


public class DirectRabbitConfig {

    public Queue directQueue(){
        return new Queue("direct.Queue");
    }

    DirectExchange directExchange(){
        return new DirectExchange("direct.Exchange",false,false);
    }

    Binding QueuetoExchange(){
        return BindingBuilder.bind(directQueue()).to(directExchange())
                .with("directRoutingkey");
    }

    DirectExchange lonelyDirectExchange() {
        return new DirectExchange("lonelyDirectExchange");
    }
}
